﻿@{
    ViewBag.Title = "WorkOrderReportViewer";
}

<!doctype html>
<html lang="en">
<head runat="server">
    <title>Work Order Report Viewer</title>

    <script src="~/Scripts/codebase/dhtmlxcommon.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/dhtmlxgrid.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/dhtmlxgridcell.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/ext/dhtmlxgrid_pgn.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/ext/dhtmlxgrid_filter.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/ext/dhtmlxgrid_export.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/dhtmlxcalendar.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/excells/dhtmlxgrid_excell_dhxcalendar.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/dhtmlxtoolbar.js" type="text/javascript" charset="utf-8"></script>

    <link rel="stylesheet" href="~/Scripts/codebase/dhtmlxgrid.css" type="text/css" media="screen" charset="utf-8">
    <link rel="stylesheet" href="~/Scripts/codebase/skins/dhtmlxgrid_dhx_skyblue.css" type="text/css" media="screen" charset="utf-8">
    <link rel="stylesheet" href="~/Scripts/codebase/dhtmlxcalendar.css" type="text/css" media="screen" charset="utf-8">
    <link rel="stylesheet" href="~/Scripts/codebase/skins/dhtmlxcalendar_dhx_skyblue.css" type="text/css" media="screen" charset="utf-8">
    <link rel="stylesheet" href="~/Scripts/codebase/skins/dhtmlxtoolbar_dhx_skyblue.css" type="text/css" media="screen" charset="utf-8">
</head>
<body>
    <br />
    <div id="WORptGrid" style="width:1200px; height:400px;">
    </div>
    <div id="recinfoArea"></div>
    <br />
    <input type="button" name="save" value="save"
           onclick="grid.toExcel('@Url.Content("~/ExportExcel/ExportWOGridToExcel")');">
    <script type="text/javascript" charset="utf-8">
        var grid = new dhtmlXGridObject("WORptGrid");
        grid.setImagePath("../Scripts/codebase/imgs/");
        grid.setHeader("SO. No, Location, WO No, INV No, QUO No, Amount (HKD), Sub-con, Sub-con Amount (HKD), Material, Remarks");
        grid.setColAlign("center,center,center,center,center,center,center,center,center,center")
        grid.attachHeader("#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#numeric_filter,#text_filter,#numeric_filter,,");
        grid.setInitWidths("70,200,100,100,100,120,200,120,200,300");
        grid.setColTypes("ro,ro,ro,ro,ro,price,ed,price,ed,ed");
        grid.enablePaging(true, 10, 3, "recinfoArea");
        grid.setPagingSkin("toolbar", "dhx_skyblue");
        grid.enableColumnAutoSize(true);
        grid.enableMultiselect(true);
        grid.setSkin("dhx_skyblue");
        grid.init();
        grid.load("/Report/WODataViewer", "json");

    </script>

</body>
</html>
